package it.unina.loquendo;

import java.io.File;

public class Costants {

	// Costanti per il riconoscitore vocale
	public static final String EXTRA_COMPILE_GRAMMAR = "compile_grammar";
	public static final String EXTRA_GRAMMAR = "grammar";
	public static final String EXTRA_PROMPT = "prompt";
	public static final String EXTRA_RESULTS = "results";
	//public static final String EXTRA_CONFIDENCE = "confidence";
	//public static final String EXTRA_SEMANTICS = "sematics";
	// Costanti per il riconoscitore vocale
	
	
	//Costanti per il TTS
	public static final String EXTRA_TTS_TEXT = "tts_text";
	//Costanti per il TTS
	
	public static final String LOGTAG = "LASRDemo";
	public static final String LOG_FOLDER = "LOG";
	
	public static final String LANG_IT = "it-it"; //in default.session as [languages]/"load"
	//public static final String GRAM_FILE_NAME = "giocatori.gram";
	//public static final String GRAM_ROName = "giocatori";
	
	public static final String LOQUENDO_CONF_FOLDER_PATH = "/sdcard/it.unina.loquendo/LoquendoASR/conf";
	public static final String LOQUENDO_DEFAULT_SESSION_FILE_PATH = LOQUENDO_CONF_FOLDER_PATH + "/" + "default.session";
	public static final String LOQUENDO_GRAM_PATH_ITA = LOQUENDO_CONF_FOLDER_PATH + "/languages/" + LANG_IT + "/builtin/binaries"; 
	//if it does not change, can also be set in default.session as [rp]/"path"
	
	public static final String INIT_DONE = "loquendo.asr.demo.INIT_DONE";
	//private static final String INIT_ERROR = "loquendo.asr.demo.CREATERO_ERROR";
	public static final String RECOG_DONE = "loquendo.asr.demo.COMMAND_DONE";




	public static boolean deleteDirectory(File path) {
	    if( path.exists() ) {
	      File[] files = path.listFiles();
	      for(int i=0; i<files.length; i++) {
	         if(files[i].isDirectory()) {
	           deleteDirectory(files[i]);
	         }
	         else {
	           files[i].delete();
	         }
	      }
	    }
	    return( path.delete() );
	  }


}
